package com.qf.service.impl;

import com.qf.mapper.ShopMapper;
import com.qf.pojo.Shop;
import com.qf.service.ShopService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
//使用注解的方式.不给标识
@Service
public class ShopServiceImpl  implements ShopService {
//      使用注解的方式自动注入
    @Autowired
    private ShopMapper shopMapper;

//    public ShopMapper getShopMapper() {
//        return shopMapper;
//    }
//
//    public void setShopMapper(ShopMapper shopMapper) {
//        this.shopMapper = shopMapper;
//    }

    @Override
    public List<Shop> findAllShop() {
        List<Shop> list = shopMapper.findAll();
        if (list!=null){
            return list;
        }
        return null;
    }
}
